All Questions
3 questions
1vote
2answers
267views
What is an appropriate length for function names? [closed]
I'm writing a C++ class, CBookSpellDef which has the following methods: int GetIndexOf(const char *psz); char* GetNameAtIndex(int index) { return m_spellTypes[index].szName; } char* ...
6votes
1answer
862views
Is method with "ByXXX" suffix (eg:findUserById) redundant?
Sometimes I can see method definition like: public User findUserById(int id){ } But my justification is, isn't "(int id)" already include the information of "ById"? is it better to have naming just ...
13votes
3answers
4kviews
In Java 8, is it stylistically better to use method reference expressions or methods returning an implementation of the functional interface?
Java 8 added the concept of functional interfaces, as well as numerous new methods that are designed to take functional interfaces. Instances of these interfaces can be succinctly created using ...